<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AdminController;
use App\Http\Controllers\MenuController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
  return response()->json(['message' => 'web-api接口']);

});
 
// 管理员主页路由

// Route::get('/admin', [AdminController::class, 'index']);
// 管理员登录路由

Route::prefix('menu')->group(function () {
    Route::get('/getlist', [MenuController::class, 'getlist']);
    Route::post('/create', [MenuController::class, 'create']);
    Route::delete('/delete', [MenuController::class, 'delete']);
    Route::put('/update', [MenuController::class, 'update']);
    Route::get('/info', [MenuController::class, 'info']);

});